import { useEffect, useLayoutEffect, useRef, useState } from 'react'
const Chat = () => {
  const xx = {}
  const chatConfig = [
    // {path}
  ]
  const renderTimes = useRef<number>(0)
  const [count, setCount] = useState(0)
  const zz = () => {
    setCount(1)
    setCount(count => count++)
    console.log('zz')
  }
  // useLayoutEffect(() => {
  //   renderTimes.current += 1
  //   console.log(renderTimes.current)
  //   return () => {
  //     console.log('销毁的：' + renderTimes.current)
  //   }
  // })
  return <div onClick={zz}>{count}</div>
}
export default Chat
